package com.zhen.concurrent.chapter05;

public class EventClient {

    public static void main(String[] args) {
        final EventQueue eventQueue = new EventQueue();
        new Thread(() -> {
            for(;;){
                eventQueue.offer(new EventQueue.Event());
            }
        },"Producer").start();
        new Thread(() -> {
            for(;;){
                eventQueue.take();
            }
        },"Consumer").start();
    }

}
